{% extends 'index.html' %}
{% load static %}


{% block css %}
    <link rel="stylesheet" href={% static 'plugins/bootstrap-datepicker.min.css' %}>
{% endblock %}
{% block content %}

    <div class="container">
        <div class="panel panel-default">
            <div class="panel panel-default">
                <div class="panel-heading">
                    <h3 class="panel-title"> 新建部门(ModelFrom版本)</h3>
                </div>
                <div class="panel-body">
                    <form method="post" novalidate>
                        {% csrf_token %}
                        {% for item in uform %}
                            <div class="form-group">
                                <label> {{ item.label }}</label>
                                {{ item }}
                                <sapn style="color: red">{{ item.errors.0 }}</sapn>

                            </div>

                        {% endfor %}


                        <button type="submit" class="btn btn-primary">提 交</button>
                    </form>

                </div>
            </div>
        </div>
    </div>

{% endblock %}

{% block js %}
    <script src="{% static 'plugins/bootstrap-datepicker.js' %}"></script>
    <script src="{% static 'plugins/bootstrap-datepicker.zh-CN.min.js' %}"></script>

    <script>
        $(function () {
            $('#id_create_time').datepicker({
                format: 'yyyy-mm-dd',
                startDate: '0d',
                language: 'zh-CN',
                autoclose: true
            })
        })
    </script>

{% endblock %}